`ifndef APB_SLV_SEQLIB_SV
`define APB_SLV_SEQLIB_SV


class apb_slv_base_seq extends uvm_sequence #(apb_transaction);
	
	apb_transaction req;

	`uvm_object_utils(apb_slv_base_seq)
	
	function new(string name = "apb_slv_base_seq");
		super.new(name);
	endfunction : new

	virtual task pre_body();
		if(starting_phase != null) begin
			starting_phase.raise_objection(this);
		end
	endtask : pre_body

	virtual task post_body();
		if(starting_phase != null) begin
			starting_phase.drop_objection(this);
		end
	endtask : post_body

endclass : apb_slv_base_seq

//----------------------------------------
class apb_slv_ready_seq extends apb_slv_base_seq;

	`uvm_object_utils(apb_slv_ready_seq)

	function new(string name = "apb_slv_ready_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req, { pslverr 		== 1'b0;
												nready_num 	== 'd0;
											})
	endtask : body

endclass : apb_slv_ready_seq

//----------------------------------------
class apb_slv_nrdy_seq extends apb_slv_base_seq;

	`uvm_object_utils(apb_slv_nrdy_seq)

	function new(string name = "apb_slv_nrdy_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req, { pslverr 	 == 1'b0;
												nready_num inside {[1:5]};
											})
	endtask : body
endclass : apb_slv_nrdy_seq

//--------------------------
class apb_slv_pslverr_seq extends apb_slv_base_seq;

	`uvm_object_utils(apb_slv_pslverr_seq)

	function new(string name = "apb_slv_pslverr_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req, { pslverr == 1'b1;
												nready_num inside {[1:5]};
											})
	endtask : body
endclass : apb_slv_pslverr_seq


`endif // APB_SLV_SEQLIB_SV

